<template>
	<view class="header-content" v-if="shopdata">
		<view class="header-card">
			<view class="left">
				<image :src="getImgSrc(shopdata.logo)" mode="" class="logo"></image>
				<view class="text-content">
					<view class="name">{{i18nLocale=='ug'?shopdata.ug_name:shopdata.cn_name}}</view>
					<view class="footer-content">
						<u-rate :count="count" readonly active-color="#ffa902" gutter="1" inactive-color="#b2b2b2"
							v-model="value"></u-rate>
					</view>
				</view>
			</view>
			<view class="right" >
				<view class="icon-box" @click="changeHome" v-if="home">
					<u-icon name="home-fill" :color="colortopic()" size="28"></u-icon>
					<text >{{$t('Home')}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['shopdata','home'],
		data() {
			return {
				address: '',
				code: false,
				codeimg: '',
				count: 5,
				value: 5,
			};
		},
		mounted() {

		},
		computed: {
			i18nLocale() {
				return this.$i18n.locale;
			},
			Neworder() {
				return this.$store.state.neworder;
			}
		},
		methods: {
			changeHome(){
				uni.reLaunch({
					url:'/pages/main/main'
				})
			}
		}

	}
</script>

<style lang="scss" scoped>
	.header-content {
		width: 100%;
		padding: $uni-spacing-padding-sm;
		box-sizing: border-box;

		.header-card {
			display: flex;
			justify-content: space-between;
			align-items: center;
			box-sizing: border-box;
			background-color: $uni-bg-color-box;
			border-radius: $uni-border-radius-base;
			box-shadow: $uni-bg-shadow;
			// margin-top: $uni-spacing-margin-sm;
			padding: $uni-spacing-padding-sm;
			.left{
				display: flex;
				align-items: center;
				.logo {
					width: 120rpx;
					height: 120rpx;
					border-radius: $uni-border-radius-sm;
				}
				.text-content {
					display: flex;
					flex-direction: column;
					justify-content: space-around;
					box-sizing: border-box;
					padding-left: 30rpx;
					font-size: $uni-font-size-lg ;
				
					.name {
						color: $uni-color-title;
					}
				
					.footer-content {
						display: flex;
						justify-content: space-between;
						margin-top: 10rpx;
						text {
							padding: 0rpx 20rpx
						}
					}
				}
			}
			.right{
				display: flex;
				flex-direction: column;
				align-items: center;
				font-size: 26rpx;
				color: $uni-color-topic;
				.icon-box{
					display: flex;
					flex-direction: column;
					align-items: center;
					text{
						padding:5rpx 0rpx;
					}
				}
			
			}
			
		}

	}
</style>